package com.biscuit.page.basicservice.api;

import com.biscuit.common.base.BaseListResponse;
import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.common.annotation.RequestWhitelist;
import com.biscuit.page.basicservice.api.model.request.collection.CollectionSaveAReq;
import com.biscuit.page.basicservice.api.model.response.collection.CollectionAResp;
import com.biscuit.page.basicservice.api.model.response.collection.CollectionSaveAResp;
import com.biscuit.page.basicservice.api.model.response.collection.DefaultCollectionRefreshStatusAResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


/**
 * @author mazihao
 * @createTime 2024/3/26 9:29
 */
@Api(tags = "收藏相关接口")
@RequestMapping("/collection")
public interface ICollectionRemote {

    @RequestWhitelist
    @ApiOperation(value = "获取收藏项列表")
    @GetMapping(value = "getCollectionList")
    BaseResponse<BaseListResponse<CollectionAResp>> getCollectionList();

    @ApiOperation(value = "保存用户收藏项（新增/编辑）")
    @PostMapping(value = "saveCollection")
    BaseResponse<CollectionSaveAResp> saveCollection(@RequestBody CollectionSaveAReq req);

    @ApiOperation(value = "根据Id删除用户收藏项")
    @DeleteMapping(value = "delCollectionById/{id}")
    BaseResponse<BaseResponseVoid> delCollectionById(@PathVariable("id") Long id);

    @ApiOperation(value = "保存默认收藏项（新增/编辑）")
    @PostMapping(value = "saveDefaultCollection")
    BaseResponse<BaseResponseVoid> saveDefaultCollection(@RequestBody CollectionSaveAReq req);

    @ApiOperation(value = "根据Id删除默认收藏项")
    @PostMapping(value = "delDefaultCollectionById/{id}")
    BaseResponse<BaseResponseVoid> delDefaultCollectionById(@PathVariable("id") String id);

    @RequestWhitelist
    @ApiOperation(value = "获取默认收藏项是否需要刷新")
    @GetMapping(value = "getDefaultCollectionRefreshStatus")
    BaseResponse<DefaultCollectionRefreshStatusAResp> getDefaultCollectionRefreshStatus();

}
